package com.longrise.android.byjk.common;

/**
 * Created by xkj on 2016/3/11.
 * 与下载缓存相关的常量类
 */
public interface DownloadConstants {

    //已经下载的课程 数据库的表名
    String TBNAME_DOWNLOAD_COURSE = "downloaded_course";
    //已经下载的课程的详情 数据库的表名
    String TBNAME_DOWNLOAD_DETAIL = "downloaded_detail";

    //新建已经下载课程的数据表
    String CREATE_DOWNLOAD_COURSE_SQL = "CREATE TABLE IF NOT EXISTS " + TBNAME_DOWNLOAD_COURSE + " ("
            + "id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "
            + "userID VARCHAR, "
            + "courseID VARCHAR, "
            + "imagePath VARCHAR, "
            + "courseName VARCHAR, "
            + "teacherName VARCHAR"
            + ")";

    //新建展示课程详情的数据表
    String CREATE_DOWNLOAD_DETAIL_SQL = "CREATE TABLE IF NOT EXISTS " + TBNAME_DOWNLOAD_DETAIL + " ("
            + "id integer primary key autoincrement not null, "
            + "userID varchar, "
            + "courseID varchar, "
            + "courseName varchar, "
            + "position integer, "
            + "downloadurl varchar, "
            + "cachepath varchar, "
            + "downloadedlength float, "
            + "totalLength float, "
            + "chapterName varchar, "
            + "chapterid varchar, "
            + "cwName varchar, "
            + "partpath varchar, "
            + "expiretime varchar, "
            + "studentno varchar, "
            + "recordid varchar, "
            + "effecttime double, "
            + "totaltraintime double, "
            + "isfinished integer, "
            + "videopass integer, "
            + "pathno varchar, "
            + "hasqa integer, "
            + "cwID varchar"
            + ")";

    //课程id
    String COURSEID = "courseID";
    //用户id
    String USERID = "userID";
    //课程展示的图片地址
    String IMAGEPATH = "imagePath";
    //课程名称
    String COURSENAME = "courseName";
    //讲师
    String TEACHER = "teacherName";
    //展示排序
    String POSITION = "position";
    //课程下载地址
    String URL = "downloadurl";
    //课程本地缓存地址
    String CACHEPATH = "cachepath";
    //已经下载完成的大小
    String DOWNLOADEDLENGTH = "downloadedlength";
    //视频总大小
    String TOTALLENGTH = "totalLength";
    //章节名称
    String CHAPTERNAME = "chapterName";
    //章节id
    String CHAPTERID = "chapterid";
    //课件名称
    String CWNAME = "cwName";
    //课件ID
    String CWID = "cwID";
    //不完整的本地地址
    String PARTPATH = "partpath";
    //过期时间
    String EXPIRETIME = "expiretime";
    //学号
    String STUDENTNO = "studentno";
    //有效时间
    String EFFECTTIME = "effecttime";
    //学习记录id
    String ID = "recordid";
    //本课件是否学完
    String ISFINISHED = "isfinished";
    //规定总学时
    String TOTALTRAINTIME = "totaltraintime";
    //当前视频是否通过
    String VIDEOPASS = "videopass";
    //是否有课后练习题
    String HASQA = "hasqa";
    //当前节点编号
    String PATHNO = "pathno";
}
